package ui;

import java.util.ArrayList;

import file.TransferFile;
import user.User;

/**
 * Abstract UI that must be inherited by UI.
 *
 */
public interface MessageObserver {
	
	/**
	 * Notify an incoming message
	 * 
	 * @param from The sender
	 * @param users The receivers, null if there no information
	 * @param text The text of the message
	 */
	public void fireNewMessage (User from, ArrayList<User> users, String text) ;
	
	/**
	 * Notify that a transfer file has been proposed by the local user.
	 * 
	 * @param tf Information about the transfer
	 */
	public void fireLocalFileQuery (TransferFile tf) ;
	
	/**
	 * Notify that a remote user has send a response about a file transfer.
	 * 
	 * @param tf Information about the transfer
	 * @param accepted true if the remote user has accepted to receive the file
	 */
	public void fireFileResponse (TransferFile tf, boolean accepted) ;
	
	/**
	 * Notify the local user that a remote user want to start a file transfer.
	 * 
	 * @param tf The corresponding TransferFile, with the oldfile path
	 */
	public void fireRemoteFileQuery (TransferFile tf) ;
}
